C128_RONMON_RUN 11-1987 {Page 80, German, RONMON Source Code} {5 New Commands for C128 Built-In Monitor} It took me a while to transfer this to C128 from the scanned pages, but glad i did it. ----------------------------------------------------------------------------------------------------------------- 1. W — Text Schreiben (Write) Syntax: W address "text" W 0c00 "Nice one" {Unfortunately, this isn't working properly, just last letter is processed!} {Find below the alternative way} 2. B — Show active flags Syntax: B b nv-bdizc irq: 00000000 fa65 3. O — {Used for addition etc. also with prefix +$%& for decimal, hexadecimal, binary, octagonal numbers} Syntax: O numbers -+/* OR {Logical OE} AND {Logical AND} EOR {Exclusive OR} O +50 + $20 { hit ENTER/RETURN} = 52 {hex} or 82 {decimal} 4. P — Printer Output Syntax: P device {0,4,5} secondary address {7 to print small characters} 0 is screen output. 4,5 are usually printer addresses P 4 7 {print to printer 4, all small characters} 5. U — Floppy drive Monitor Syntax: U{x} Command Track Sector Address U1 {read } U2 {write} U1 18 0 2000 {this will READ sector 18 and load into the address $2000 {dec, 8192} {where you can then analyze it.} U2 1 0 b00 {this will WRITE the content of the address $b00 to $bff onto Boot-Sector of the floppy disk.} ----------------------------------------------------------------------------------------------------------------- RONMON SOURCE CODE {TO BE PASTED INTO ML-Monitor of C128} Start with sys 4864 {BASIC}, J1300 in ML-Monitor and also with F8 AFTER the exit with X. {I only ever needed 2 commands, B and O! Very useful} >01300 4c 0c 13 4c c5 b0 4c bc:l..lEPl. >01308 b0 4c a7 b7 a9 00 8d 00:PlGWI... >01310 ff 85 06 85 07 85 08 85:........ >01318 05 85 02 20 2b 15 20 7d:... +. . >01320 ff 0d 52 4f 4e 4d 4f 4e:..ronmon >01328 20 53 50 45 43 49 41 4c: special >01330 00 a2 3e a0 13 8e 2e 03:.B>..... >01338 8c 2f 03 4c 46 b0 a2 00:./.lfPB. >01340 dd 63 13 f0 08 e8 e0 1b:.C.P.H.. >01348 d0 f6 4c 06 13 e0 16 90:PVl..... >01350 b2 8a 38 e9 15 0a aa bd:R.8I..J. >01358 80 13 48 bd 7f 13 48 4c:..h...hl >01360 09 13 60 41 43 44 46 47:...acdfg >01368 48 4a 4d 52 54 58 40 2e:hjmrtx@. >01370 3e 3b 24 2b 26 25 4c 53:>;$+&%ls >01378 56 57 50 4f 42 55 00 00:vwpobu.. >01380 00 8d 13 bc 13 1e 14 44:.......d >01388 15 97 15 00 00 00 20 e9:...... I >01390 b8 c9 20 f0 f9 c9 22 d0:XI PYI"P >01398 21 20 01 b9 20 e9 b8 c9:! .Y IXI >013a0 00 f0 04 c9 22 d0 05 a9:.P.I"P.I >013a8 57 4c 49 b5 a0 00 20 2a:wliU.. * >013b0 b1 e6 65 d0 e7 e6 67 4c:QFEPGFGl >013b8 9c 13 4c 06 13 b0 fb 20:..l..P. >013c0 01 b9 20 a7 b7 a5 66 85:.Y GWEF. >013c8 89 f0 0a c9 04 f0 16 c9:.P.I.P.I >013d0 05 f0 12 d0 47 a9 0d 20:.P.PgI. >013d8 d2 ff 20 cc ff a9 01 20:R. L.I. >013e0 c3 ff 4c 8e b0 a9 00 20:C.l.PI. >013e8 bd ff a9 0d 20 d2 ff a4:..I. R.D >013f0 60 f0 04 c0 07 d0 15 a9:.P...P.I >013f8 01 a6 89 20 ba ff 18 20:.F. Z.. >01400 c0 ff b0 08 a2 01 20 c9:..P.B. I >01408 ff 4c 8b b0 20 cc ff a9:.l.P L.I >01410 01 20 c3 ff a9 02 20 c3:. C.I. C >01418 ff 4c 8b b0 4c 06 13 20:.l.Pl.. >01420 e9 b8 c9 20 f0 f9 a2 00:IXI PYB. >01428 dd 41 14 f0 08 e8 e0 07:.a.P.H.. >01430 d0 f6 4c 1c 14 8a 48 20:PVl...h >01438 01 b9 20 a7 b7 68 4c 48:.Y GWHlh >01440 14 2b 2d 2a 2f 45 41 4f:.+-*/eao >01448 0a aa bd 57 14 85 87 bd:.J.w.... >01450 58 14 85 88 6c 87 00 95:x...L... >01458 14 a5 14 b5 14 db 14 86:.E.U.... >01460 14 68 14 77 14 ea ea ea:.H.W.JJJ >01468 a5 60 25 66 85 66 a5 61:E.%F.FEA >01470 25 67 85 67 4c 11 15 a5:%G.Gl..E >01478 60 05 66 85 66 a5 61 05:..F.FEA. >01480 67 85 67 4c 11 15 a5 60:G.Gl..E. >01488 45 66 85 66 a5 61 45 67:eF.FEAeG >01490 85 67 4c 11 15 18 a5 60:.Gl...E. >01498 65 66 85 66 a5 61 65 67:EF.FEAEG >014a0 85 67 4c 11 15 38 a5 66:.Gl..8EF >014a8 e5 60 85 66 a5 67 e5 61:E..FEGEA >014b0 85 67 4c 11 15 a2 00 86:.Gl..B.. >014b8 87 86 88 a5 60 05 61 f0:...E..AP >014c0 48 46 61 66 60 90 0d 18:hfAF.... >014c8 a5 87 65 66 85 87 a5 88:E.EF..E. >014d0 65 67 85 88 06 66 26 67:EG...F&G >014d8 18 90 e0 a2 00 86 87 86:...B.... >014e0 88 a5 60 05 61 f0 41 ca:.E..APaJ >014e8 06 60 26 61 90 f9 66 61:..&A.YFA >014f0 66 60 38 a5 66 e5 60 a8:F.8EFE.H >014f8 a5 67 e5 61 90 04 04 66:EGEA...F >01500 85 67 26 87 26 88 e8 30:.G&.&.H0 >01508 e5 a6 87 a5 88 86 66 85:EF.E..F. >01510 67 a9 00 85 68 a9 1d 20:GI..HI. >01518 d2 ff 20 d2 ff a9 3d 20:R. R.I= >01520 d2 ff 20 92 b8 4c 8b b0:R. .Xl.P >01528 4c 06 13 a2 3c a0 15 86:l..B<... >01530 89 84 8a a9 89 a2 08 a0:...I.B.. >01538 09 4c 65 ff 53 59 53 20:.lE.sys >01540 34 38 36 34 0d 20 7d ff:4864. .. >01548 0d 4e 56 2d 42 44 49 5a:.nv-bdiz >01550 43 20 20 49 52 51 3a 0d:c irq:. >01558 00 a2 07 a5 05 48 68 0a:.B.E.hH. >01560 48 b0 03 a9 30 2c a9 31:hP.I0,I1 >01568 20 d2 ff ca 10 f0 68 a9: R.J.PHI >01570 20 20 d2 ff 20 d2 ff ad: R. R.M >01578 14 03 ae 15 03 20 9f b8:..N.. .X >01580 4c 8b b0 20 7d ff 55 31:l.P ..u1 >01588 3a 32 20 30 20 30 31 20::2 0 01 >01590 30 31 00 60 23 4c 06 13:01..#l.. >01598 20 01 b9 a5 66 c9 02 f0: .YEFI.P >015a0 04 c9 01 d0 f0 20 a7 b7:.I.PP GW >015a8 a5 60 c9 29 b0 e7 85 87:E.I)PG.. >015b0 20 a7 b7 a5 60 a6 87 e0: GWE.F.. >015b8 12 b0 06 c9 15 b0 d6 90:.P.I.PV. >015c0 18 e0 19 b0 06 c9 13 b0:...P.I.P >015c8 cc 90 0e e0 1f b0 06 c9:L....P.I >015d0 12 b0 c2 90 04 c9 11 b0:.PB..I.P >015d8 bc 85 88 20 a7 b7 a5 88:... GWE. >015e0 20 fb f9 8e 90 15 8d 91: .Y..... >015e8 15 a5 87 20 fb f9 8e 8d:.E. .Y.. >015f0 15 8d 8e 15 a5 66 18 69:....EF.I >015f8 30 8d 87 15 a6 62 20 3f:0...FB ? >01600 f7 a9 02 a8 a2 08 20 ba:WI.HB. Z >01608 ff a9 01 a2 94 a0 15 20:.I.B... >01610 bd ff a9 02 20 c0 ff b0:..I. ..P >01618 60 a9 00 20 bd ff a9 01:.I. ..I. >01620 a2 08 a0 0f 20 ba ff 20:B... Z. >01628 c0 ff b0 4d a2 01 20 c9:..PmB. I >01630 ff 20 83 15 20 cc ff a2:. .. L.B >01638 02 a5 66 c9 01 d0 14 20:.EFI.P. >01640 c6 ff 20 01 b9 a0 00 20:F. .Y.. >01648 cf ff 20 2a b1 c8 d0 f7:O. *QHPW >01650 4c 78 16 ca 20 c9 ff 20:lX.J I. >01658 7d ff 42 2d 50 20 32 20:..b-p 2 >01660 30 00 20 cc ff a2 02 20:0. L.B. >01668 c9 ff 20 01 b9 a0 00 20:I. .Y.. >01670 1a b1 20 d2 ff c8 d0 f7:.Q R.HPW >01678 18 4c 0c 14 00 00 28 43:.l....(c >01680 29 20 31 39 38 36 2c 31:) 1986,1 >01688 39 38 37 20 52 2e 4b 4f:987 r.ko >01690 45 52 42 45 52 2c 50 4f:erber,po >01698 53 54 46 41 43 48 20 31:stfach 1 >016a0 33 20 30 34 2c 35 39 34:3 04,594 >016a8 30 20 4c 45 4e 4e 45 53:0 lennes >016b0 54 41 44 54 20 31 00 00:tadt 1.. >016b8 00 00 00 00 00 00 00 00:........ >016c0 00 00 00 00 00 00 00 00:........ >016c8 00 00 00 00 00 00 00 00:........ >016d0 00 00 00 00 00 00 00 00:........ >016d8 00 00 00 00 00 00 00 00:........ >016e0 00 00 00 00 00 00 00 00:........ >016e8 00 00 00 00 00 00 00 00:........ >016f0 00 00 00 00 00 00 00 00:........ >016f8 00 00 00 00 00 00 00 00:........ >01700 00 --------------------------------------- Example: --------------------------------------- sys4864 ronmon special pc sr ac xr yr sp ; 01300 00 00 00 00 f6 Example program! commodore c128 - the boss! >00b00 a2 00 bd 0f 0b 9d 00 04:B....... >00b08 e8 e0 1a d0 f5 60 ea 03:H..PU.J. >00b10 0f 0d 0d 0f 04 0f 12 05:........ >00b18 20 03 31 32 38 20 2d 20: .128 - >00b20 14 08 05 20 02 0f 13 13:... .... >00b28 21 20 00 00 00 00 00 00:! ...... jb00 {to execute the code within ML-Monitor} b {to see the active and used flags} nv-bdizc irq: 00110011 fa65 {code disassembled} d b00 . 00b00 a2 00 ldx #$00 . 00b02 bd 0f 0b lda $0b0f,x . 00b05 9d 00 04 sta $0400,x . 00b08 e8 inx . 00b09 e0 1a cpx #$1a . 00b0b d0 f5 bne $0b02 . 00b0d 60 rts . 00b0e ea nop . 00b0f {start of the text transfer address, 26 characters long, #$1a} Note: The W command isn't working properly! Meaning: W 0b0f "Hello" is writing only the last "o" and not the whole word. I am resolving this by using T{transfer} command like this: {write your message into left upper corner, e.g. commodore c128 - the boss! } {then type T 0400 041a 0b0f and press enter } {this will also write your message into given transfer address, just like W would do } {nice way to write some text where you need it like in our example above } { {of course, any commercial assembler editor don't need that! }